package com.online.study.system.controller;

import com.online.study.system.model.dto.DictionaryDto;
import com.online.study.system.service.DictionaryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/dictionary")
public class DictionaryController {

    @Resource
    private DictionaryService dictionaryService;

    @GetMapping("/all")
    public List<DictionaryDto> getAllDictionary() {
        return dictionaryService.getAllDictionary();
    }
}
